home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / DriverSynchronization.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  2.9 KB  |  155 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        DriverSynchronization.h
  3.  
  4.      Contains:    Driver Synchronization Interfaces.
  5.  
  6.      Version:    Technology:    MacOS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DRIVERSYNCHRONIZATION__
  18. #define __DRIVERSYNCHRONIZATION__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __MACTYPES__
  25.     #include <MacTypes.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. EXTERN_API_C( void )
  52. SynchronizeIO                    (void)                                                        ONEWORDINLINE(0x4E71);
  53.  
  54. EXTERN_API_C( Boolean )
  55. CompareAndSwap                    (UInt32                 oldVvalue,
  56.                                  UInt32                 newValue,
  57.                                  UInt32 *                OldValueAdr);
  58.  
  59. EXTERN_API_C( Boolean )
  60. TestAndClear                    (UInt32                 bit,
  61.                                  UInt8 *                startAddress);
  62.  
  63. EXTERN_API_C( Boolean )
  64. TestAndSet                        (UInt32                 bit,
  65.                                  UInt8 *                startAddress);
  66.  
  67. EXTERN_API_C( SInt8 )
  68. IncrementAtomic8                (SInt8 *                value);
  69.  
  70. EXTERN_API_C( SInt8 )
  71. DecrementAtomic8                (SInt8 *                value);
  72.  
  73. EXTERN_API_C( SInt8 )
  74. AddAtomic8                        (SInt32                 amount,
  75.                                  SInt8 *                value);
  76.  
  77. EXTERN_API_C( UInt8 )
  78. BitAndAtomic8                    (UInt32                 mask,
  79.                                  UInt8 *                value);
  80.  
  81. EXTERN_API_C( UInt8 )
  82. BitOrAtomic8                    (UInt32                 mask,
  83.                                  UInt8 *                value);
  84.  
  85. EXTERN_API_C( UInt8 )
  86. BitXorAtomic8                    (UInt32                 mask,
  87.                                  UInt8 *                value);
  88.  
  89. EXTERN_API_C( SInt16 )
  90. IncrementAtomic16                (SInt16 *                value);
  91.  
  92. EXTERN_API_C( SInt16 )
  93. DecrementAtomic16                (SInt16 *                value);
  94.  
  95. EXTERN_API_C( SInt16 )
  96. AddAtomic16                        (SInt32                 amount,
  97.                                  SInt16 *                value);
  98.  
  99. EXTERN_API_C( UInt16 )
  100. BitAndAtomic16                    (UInt32                 mask,
  101.                                  UInt16 *                value);
  102.  
  103. EXTERN_API_C( UInt16 )
  104. BitOrAtomic16                    (UInt32                 mask,
  105.                                  UInt16 *                value);
  106.  
  107. EXTERN_API_C( UInt16 )
  108. BitXorAtomic16                    (UInt32                 mask,
  109.                                  UInt16 *                value);
  110.  
  111. EXTERN_API_C( SInt32 )
  112. IncrementAtomic                    (SInt32 *                value);
  113.  
  114. EXTERN_API_C( SInt32 )
  115. DecrementAtomic                    (SInt32 *                value);
  116.  
  117. EXTERN_API_C( SInt32 )
  118. AddAtomic                        (SInt32                 amount,
  119.                                  SInt32 *                value);
  120.  
  121. EXTERN_API_C( UInt32 )
  122. BitAndAtomic                    (UInt32                 mask,
  123.                                  UInt32 *                value);
  124.  
  125. EXTERN_API_C( UInt32 )
  126. BitOrAtomic                        (UInt32                 mask,
  127.                                  UInt32 *                value);
  128.  
  129. EXTERN_API_C( UInt32 )
  130. BitXorAtomic                    (UInt32                 mask,
  131.                                  UInt32 *                value);
  132.  
  133.  
  134.  
  135. #if PRAGMA_STRUCT_ALIGN
  136.     #pragma options align=reset
  137. #elif PRAGMA_STRUCT_PACKPUSH
  138.     #pragma pack(pop)
  139. #elif PRAGMA_STRUCT_PACK
  140.     #pragma pack()
  141. #endif
  142.  
  143. #ifdef PRAGMA_IMPORT_OFF
  144. #pragma import off
  145. #elif PRAGMA_IMPORT
  146. #pragma import reset
  147. #endif
  148.  
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152.  
  153. #endif /* __DRIVERSYNCHRONIZATION__ */
  154.  
  155.